package com.jshcbd.modules.asset.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jshcbd.modules.asset.service.IRepairService;
import com.jshcbd.modules.asset.vo.AssetRepairVo;
import com.jshcbd.modules.asset.vo.RepairVo;
import com.jshcbd.modules.asset.entity.RepairEntity;
import com.jshcbd.modules.asset.mapper.RepairMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhoucd
 * @date
 * @description
 */
@Slf4j
@Service
@Transactional
public class RepairServiceImpl extends ServiceImpl<RepairMapper, RepairEntity> implements IRepairService {

    @Autowired
    private RepairMapper repairMapper;


    @Override
    public IPage<RepairVo> listView(Page<RepairVo> page, Wrapper wrapper) {
        return repairMapper.selectPageView(page,wrapper);
    }

    @Override
    public IPage<AssetRepairVo> pageViewByAssetId(Page<AssetRepairVo> page, String assetId) {
        return repairMapper.pageViewByAssetId(page,assetId);
    }
}
